package cn.edu.jxyy.p4.controller;

import cn.edu.jxyy.p4.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
    public class UserController {
        //使用@Resource注解注入UserService
//        @Resource(name="userService")
        @Autowired
        private UserService userService;
        public void save(){
            this.userService.save();
            System.out.println("执行UserController.save()");
        }
    }


